import { Component } from 'react';
import React from 'react';
import { connect } from 'umi';
import KeywordFilterSearch from '@/components/KeywordFilterSearch';
import GroupHeader from '@/components/GroupHeader';

class AssetUploadPage extends Component<any, any> {
  actionRef: any;

  constructor(props: any) {
    super(props);
  }

  componentDidMount() {}

  clomns: any = [
    {
      title: '姓名',
      dataIndex: 'name',
      rules: [
        {
          required: true,
          message: '规则名称为必填项',
        },
      ],
    },
    {
      title: '学号',
      dataIndex: 'desc',
      valueType: 'textarea',
    },
    {
      title: '班级',
      dataIndex: 'callNo',
      sorter: true,
      hideInForm: true,
      renderText: (val: string) => `${val} 万`,
    },
    {
      title: '年级',
      dataIndex: 'status',
      hideInForm: true,
      valueEnum: {
        0: { text: '关闭', status: 'Default' },
        1: { text: '运行中', status: 'Processing' },
        2: { text: '已上线', status: 'Success' },
        3: { text: '异常', status: 'Error' },
      },
    },
    {
      title: '学院',
      dataIndex: 'status',
      hideInForm: true,
      valueEnum: {
        0: { text: '关闭', status: 'Default' },
        1: { text: '运行中', status: 'Processing' },
        2: { text: '已上线', status: 'Success' },
        3: { text: '异常', status: 'Error' },
      },
    },
    {
      title: '更新时间',
      dataIndex: 'desc',
      valueType: 'textarea',
    },
  ];
  handleDataImport() {}
  handleDataExport() {}
  render() {
    return (
      <div>
        <GroupHeader
          onChage={(value) => {
              // console.log("上传资源")
          }}
          defaultValue={""}
          prefix="资源管理"
          options={[{title:"上传资源"}]}
        ></GroupHeader>
        <KeywordFilterSearch
          filters={[
            {
              title: '资源类型',
              multiple: false,
              keywords: ['全部', '图片', '视频', '音频', '动画', '3D模型'],
            },
            { title: '资源状态', multiple: false, keywords: ['全部', '审核通过', '审核未通过'] },
          ]}
        ></KeywordFilterSearch>

      </div>
    );
  }
}

export default connect()(AssetUploadPage);
